package com.song.service;

import com.song.entity.BorrowInfo;
import com.song.entity.Lend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.song.entity.LendItemReturn;
import com.song.entity.vo.BorrowInfoApprovalVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的准备表 服务类
 * </p>
 *
 * @author Song
 * @since 2025-01-03
 */
public interface LendService extends IService<Lend> {

    public void createLend(BorrowInfoApprovalVO borrowInfoApprovalVO, BorrowInfo borrowInfo);

    public List<Lend> selectList();

    public Map<String, Object> selectLendById(Long id);

    public Map<String, Object> getLendDetailById(Long lendId);

    public BigDecimal getInterestCount(BigDecimal investAmount, BigDecimal lendYearRate, Integer period, Integer returnMethod);

    public void makeLoan(Long id);

    public List<LendItemReturn> returnInvest(Long id, Map<Integer, Long> lendReturnMap, Lend lend);
}
